package me.xplabs 
{
	import me.xplabs.msg.NotificationName;
	import org.puremvc.as3.patterns.facade.Facade;
	
	/**
	 * ...
	 * @author xiaohan
	 */
	public class AppFacade extends Facade 
	{
		public function AppFacade() 
		{
			super();
		}
		
		public static function getInstance():AppFacade
		{
			return AppFacade(instance ||= new AppFacade());
		}
		
		public function startup(app:Main):void
		{
			Globals.init(app.stage);
			
			registerCommand(NotificationName.STARTUP, ApplicationCommand);
			sendNotification(NotificationName.STARTUP, Globals.gameLayer);
		}
	}
}